﻿<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no, minimal-ui" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="format-detection" content="telephone=no, email=no" />
    <link href="css/global.css" rel="stylesheet" type="text/css" />
    <script src="../js/jquery-1.8.3.min.js"></script>
    <script src="../js/jquery.easydropdown.min.js"></script>
    <script src="../bootstrap/iCheck-master/icheck.js"></script>
    <script src="../bootstrap/js/bootstrap.min.js"></script>
    <!--<script src="js/checkbox.js"></script>-->
    <script src="../js/PageIndex2.js"></script>
    <script src="http://static.tops001.com/kk.js"></script>
    <script src="../js/Common.js"></script>
    <script src="../js/jquery.iDialog.min.js" dialog-theme="default"></script>
    <script type="text/javascript" src="js/WdatePicker.js"></script>
    <script src="../js/list.js"></script>
    <title>报备记录</title>
    <style type="text/css">
        body {
            background: #eeeeee;
        }

        .alist {
            margin: 15px 0;
            background: #ffffff;
            border-top: 1px solid #e4e4e4;
            border-bottom: 1px solid #e4e4e4;
            padding: 0 15px;
        }

            .alist li {
                padding: 4px 0;
                border-bottom: 1px solid #e4e4e4;
            }

                .alist li:last-child {
                    border-bottom: 0 none;
                }

        .alist_line1 {
            width: 100%;
            height: 26px;
            line-height: 26px;
        }

        .aname {
            font-size: 16px;
            color: #000000;
            float: left;
        }

        .astate {
            font-size: 14px;
            float: right;
        }

        .state_blue {
            color: #00aaff;
        }

        .state_green {
            color: #3ccb06;
        }

        .state_red {
            color: #ff4343;
        }

        .alist_line2 {
            width: 100%;
            height: 24px;
            line-height: 24px;
        }

        .anumber {
            font-size: 14px;
            color: #999999;
            float: left;
        }

        .atime {
            font-size: 14px;
            color: #999999;
            float: right;
        }

        .notip {
            width: 120px;
            height: 30px;
            padding-top: 120px;
            line-height: 30px;
            text-align: center;
            font-size: 14px;
            color: #999999;
            position: absolute;
            top: 120px;
            left: 50%;
            margin-left: -60px;
            background: url(images/noicon.png) no-repeat top center;
            background-size: 110px 110px;
        }
    </style>
</head>
<body>
    <ul class="alist LoanInfoList">
        <li>
            <a href="detail.html?id={ID}">
                <div class="alist_line1">
                    <span class="aname">{CustomerName}</span>
                    {AvailableDays}
                    {ApplyStatus}
                </div>
                <div class="alist_line2">
                    <span class="anumber">{Phone}</span>
                    <span class="atime">申请日期 {ApplyTime}</span>
                </div>
            </a>
        </li>
    </ul>
    <div class="notip" style="display:none;">您还未申请首付贷</div>
    <script>
        $(document).ready(function () {
            Paging(1);
        });

        function Paging(pagenumber) {
            pagenumber = pagenumber || 1;
            var pageSize = $("#selectedPageSize").val() || $.PageSize();
            var requestParam = {
                pageIndex: pagenumber,
                pagesize: pageSize,
            };

            kk.api.jsonp("Customer/GetCustomerApplyList", requestParam, function (data) {
                makePageBar(Paging, data.Count, pagenumber, pageSize);
                var index = (pagenumber - 1) * pageSize;
                kk.fillList(".LoanInfoList", data.Items, function (item, name) {
                    if (name == ["ApplyStatus"]) {
                        if (item[name] == 4) {
                            return '<span class="astate state_blue">审核中</span>';
                        } else if (item[name] == 8) {
                            return '<span class="astate state_green">审核通过</span>';
                        } else if (item[name] == 11) {
                            return '<span class="astate state_red">审核不通过</span>';
                        } else if (item[name] == 12) {
                            return '<span class="astate state_red">申请已失效</span>';
                        }
                    } else if (name == ["AvailableDays"]) {
                        if (item["ApplyStatus"] != 4) {
                            return "";
                        } else {
                            return '<span class="state_red available">' + item[name] + '天后失效</span>';
                        }
                    }
                });
            });


        }
    </script>
</body>
</html>
